Skip to content

Add dead code inventory: confirmed-dead Rust functions and uncertain test/skill assets - #4

Draft
ProjectAI00 with Copilot wants to merge 2 commits into
mainfrom
copilot/inventory-unused-code-assets
Draft

Add dead code inventory: confirmed-dead Rust functions and uncertain test/skill assets#4
ProjectAI00 with Copilot wants to merge 2 commits into
mainfrom
copilot/inventory-unused-code-assets

Conversation

Copilot AI commented Mar 4, 2026

Copy link
Copy Markdown

Scans src/main.rs, scripts/, npm/skills/, skills/, prompts/, and tests/ to produce a concrete, evidence-backed inventory of unused code and assets, labeled SAFE (conclusively dead) or UNCERTAIN (needs manual verification).

Confirmed dead — SAFE to remove

  • cmd_goals (src/main.rs:1116–1176)cargo check warns unused; no Commands::Goals enum variant; no dispatch arm; no test ever calls imi goals
  • cmd_tasks (src/main.rs:1190–1287) — same: compiler warning, no enum variant, no dispatch, zero test coverage

Both functions' logic is superseded by imi plan / imi context / imi status.

Uncertain — manual review needed

Item Why uncertain
tests/eval-loop.sh Not in make test or CI; hardcoded dev-machine binary path; covers distinct loop flows not in integration.sh
tests/eval-human-sim.sh No Makefile/CI/README reference; no call sites anywhere in the repo
skills/imi/scripts/session-start.sh marketplace.json points to ./skills/imi as plugin skill root, but SKILL.md is absent there; npm install reads from npm/skills/imi/ instead; integration.sh tests this file's existence

Active (confirmed not dead)

scripts/session-start.sh, prompts/ (used by cmd_run/cmd_wrap at src/main.rs:2367,2467), npm/skills/imi/*.md, tests/integration.sh.

Original prompt

Task: Inventory unused code and assets

Description

Produce a concrete inventory of likely dead code/files/folders by scanning source, scripts, npm skill package, and test references. Mark each candidate with evidence of non-usage (no imports/calls/references in runtime paths or tests). Separate obvious dead items from uncertain items that need manual review.

Acceptance Criteria

Inventory exists with evidence per candidate and clear safe/uncertain labels.

Relevant Files

  • src/main.rs
  • scripts/
  • npm/skills/
  • tests/

Tools

  • (none)

Goal description

Audit and remove dead code paths, unused modules, stale scripts, and unnecessary folders that are no longer part of the active IMI runtime. Prioritize safety by proving non-usage before deletion, preserving required skill/runtime assets, and keeping behavior unchanged for supported flows. Include a final verification pass to ensure CLI commands and test suites still pass after removals.

Goal why

Reduce maintenance burden, confusion, and risk from stale assets while keeping the core loop reliable.

Prior work on this goal

  • Remove confirmed dead assets (mmbtus236j11h4rn): Wrapped command succeeded: sh -c gh agent-task create -F "$IMI_TASK_CONTEXT_FILE"
  • Verify cleanup with full loop checks (mmbtus2ha5sk4sp4): Wrapped command succeeded: sh -c gh agent-task create -F "$IMI_TASK_CONTEXT_FILE"
  • Add guardrails for future dead code drift (mmbtus2a7r84dihk): Wrapped command succeeded: sh -c gh agent-task create -F "$IMI_TASK_CONTEXT_FILE"

Decisions affecting this goal

  • (none)

Workspace Path

/Users/aimar/Documents/Kitchen/imi/ai-db-imi


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…tain labels

Co-authored-by: ProjectAI00 <174952601+ProjectAI00@users.noreply.github.com>
Copilot AI changed the title [WIP] Audit and inventory unused code and assets Add dead code inventory: confirmed-dead Rust functions and uncertain test/skill assets Mar 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants